﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Security;
using System.Security.Cryptography;
using System.IO;

namespace PFMHandlers
{
   
    public  class PFMEncodeHandler:PFMHandler
    {
        
        public  byte []  PFMEncode(byte[] Encode)
        {
            PFMGlobals.PFMDefinitions.param = new CspParameters();
            PFMGlobals.PFMDefinitions.param.KeyContainerName = "Olive";//密匙容器的名称，保持加密解密一致才能解密成功
            using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(PFMGlobals.PFMDefinitions.param))
            {
                return rsa.Encrypt(Encode, false);
            }
        }
    }
}
